import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'
const userid = 'h_id'
const routerpath = 'path'
const username = 'user_name'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function getuserid() {
  return Cookies.get(userid)
}

export function getpath() {
  return Cookies.get(routerpath)
}

export function getusername() {
  return Cookies.get(username)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function setuserid(h_id) {
  return Cookies.set(userid, h_id)
}

export function setpath(path) {
  return Cookies.set(routerpath, path)
}

export function setusername(user_name) {
  return Cookies.set(username, user_name)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function removeUserid() {
  return Cookies.remove(userid)
}

export function removeRouterpath() {
  return Cookies.remove(routerpath)
}

export function removeUsername() {
  return Cookies.remove(username)
}
